<template>
    <div class="dialogBox">
        <el-dialog :title="dialogTitle" :visible.sync="ViewDetails" :before-close="cencelSend" width="50%" center>
            <el-table :data="tableData" height="250" border style="width: 100%;color:#EDEDED; border-color: #1560AC;"
                :cell-style="{ background: '#123150', borderColor: '#1560AC', color: '#EDEDED' }"
                :row-style="{ background: '#123150', borderColor: '#1560AC', color: '#EDEDED' }"
                :header-cell-style="{ background: '#123150', borderColor: '#1560AC', color: '#EDEDED', fontSize: '14px', }">
                <el-table-column prop="gylx" label="工艺类型" align="center">
                </el-table-column>
                <el-table-column prop="ctbh" label="池体编号" align="center">
                </el-table-column>
                <el-table-column prop="jcnr" label="检测内容" align="center">
                </el-table-column>
            </el-table>
        </el-dialog>
    </div>
</template>
<script>
import { GetViewDetails, DeleteViewDetails } from '@/api/cyRobot/quest'
export default {
    props: ['dialogTitle', 'appendDialogViewDetails', 'taskNo'],
    name: 'ViewDetails',
    data() {
        return {
            types: '0',
            //查看详情按钮
            ViewDetails: false,
            localTaskNo: this.taskNo,
            tableData: []
        };
    },
    methods: {
        //获取查看详情数据
        getViewDetails() {
            GetViewDetails(this.localTaskNo).then(response => {
                this.tableData = response.rows
            })
        },
        // 取消
        cencelSend(ruleForm) {
            this.$emit('cencelSend',)//触发父组件的子组件上绑定的cencelSend方法
        }
    },
    watch: {
        taskNo(newValue, oldValue) {
            this.localTaskNo = newValue
            this.getViewDetails()
        },
        //监听父组件传过来的表单数据
        appendDialogViewDetails(newValue, oldValue) {
            this.ViewDetails = newValue
        }
    }
}
</script>

<style lang="scss" scoped>
* {
    padding: 0;
    margin: 0;
}

.dialogBox {
    .btn3 {
        width: 60px;
        height: 30px;
        font-family: Source Han Sans CN;
        font-weight: 500;
        font-size: 12px;
        color: #EDEDED;
        background: linear-gradient(0deg, #722943, #05111D);
        border-radius: 2px;
        border: 1px solid #942028;
    }

    .btn4 {
        width: 60px;
        height: 30px;
        font-family: Source Han Sans CN;
        font-weight: 500;
        font-size: 10px;
        color: #EDEDED;
        background: linear-gradient(0deg, #0D1538, #444545);
        border-radius: 2px;
        border: 1px solid #4B4B4B;
    }

    .btn5 {
        width: 60px;
        height: 30px;
        font-family: Source Han Sans CN;
        font-weight: 500;
        font-size: 10px;
        color: #EDEDED;
        background: linear-gradient(0deg, #123150, #1C97B1);
        border-radius: 2px;
        border: 1px solid #1560AC;
    }

    .btn6 {
        width: 60px;
        height: 30px;
        font-family: Source Han Sans CN;
        font-weight: 500;
        font-size: 10px;
        color: #EDEDED;
        background: linear-gradient(0deg, #052439, #34A432);
        border-radius: 2px;
        border: 1px solid #185A22;
    }

    ::v-deep .gutter {
        background-color: #123150;
    }

    //最底下的线条
    ::v-deep .el-table::before,
    .el-table--group::after,
    .el-table--border::after {
        background-color: #1560AC;
    }

    .el-table__fit {
        background-color: #123150;
    }

    ::v-deep .el-table__body-wrapper {
        background-color: #123150;
    }

    ::v-deep .el-dialog__header {
        background-color: #123150;
        color: #ffff;
    }

    ::v-deep .el-dialog__title {
        color: #ffff;
    }

    ::v-deep .el-dialog__body {
        background-color: #123150;
    }

    ::v-deep .el-dialog__footer {
        background-color: #123150;
    }

    ::v-deep .el-input__inner {
        background-color: #123150;
        color: #EDEDED;
    }

    ::v-deep .el-form-item__label {
        color: #EDEDED;
    }

    ::v-deep .el-form-item__label {
        width: 102px !important;
    }

    ::v-deep .el-input__inner {
        margin-bottom: 18px;
    }

    ::v-deep .el-input__inner {
        border-color: #1560AC;
    }

    .dialog-footer {
        display: flex;
        justify-content: center;

        .btn1 {
            width: 80px;
            height: 30px;
            display: flex;
            justify-content: center;
            align-items: center;
            border: 1px solid #F0F0F0;
            border-radius: 5px;
            margin-right: 10%;
        }

        .btn2 {
            width: 80px;
            height: 30px;
            display: flex;
            justify-content: center;
            align-items: center;
            border: 1px solid #F0F0F0;
            border-radius: 5px;
        }

        ::v-deep .el-button--default {
            background-color: #123150;
        }

        ::v-deep .el-button--default:hover {
            background-color: #F0F0F0;
        }

        ::v-deep .el-button--default {
            color: #E1E2E5;
        }

        ::v-deep .el-button--default:hover {
            color: #142150;
        }
    }
}
</style>
